package info.motteke.util;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.naming.Context;
import javax.naming.NamingException;

public final class Closer {

    public static void close(Context c){
        if(c == null){
            return;
        }
        try{
            c.close();
        } catch (NamingException e) {

        }
    }

    public static void close(Statement st){
        if(st == null){
            return;
        }
        try{
            st.close();
        } catch (SQLException e) {

        }
    }

    public static void close(ResultSet rs){
        if(rs == null){
            return;
        }
        try{
            rs.close();
        } catch (SQLException e){

        }
    }
}
